package models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import net.sf.oval.constraint.NotNull;

import play.data.validation.MinSize;
import play.data.validation.Required;
import play.db.jpa.Model;
/**
 * @author MrROY
 * 好友关系
 */
@Entity
@Table(name="T_FRIEND_SHIP")
public class FriendShip extends Model{
	@Required
	@ManyToOne
	public User owner;
	@Required
	@ManyToOne
	public User friend;
	
	public FriendShip(){}
	public FriendShip(Long ownerId,Long friendId){
		this.owner = User.findById(ownerId);
		this.friend = User.findById(friendId);
	}
}
